home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.rexx
- Path: netcom.com!netkid
- From: netkid@netcom.com
- Subject: Re: Talking NNTP with RXSOCK
- Message-ID: <netkidDq61Bs.J3I@netcom.com>
- Sender: netkid@netcom4.netcom.com
- Reply-To: netkid@netcom.com
- Organization: NETCOM On-line Communication Services (408 261-4700 guest)
- X-Newsreader: IBM NewsReader/2 v1.2.5
- References: <Pine.SUN.3.91.960420010342.14173A-100000@descartes.uwaterloo.ca>
- Date: Sat, 20 Apr 1996 14:52:40 GMT
-
- In <Pine.SUN.3.91.960420010342.14173A-100000@descartes.uwaterloo.ca>, Ethan Hall-Beyer <eahallbe@descartes.uwaterloo.ca> writes:
- >
- >I'm trying to write a REXX script that takes a properly-formatted text
- >file, and posts it to my news server. The file contains header and body
- >with all the required fields. This is using the RXSOCK interface.
- >
- >However, no matter what I do, after posting and terminating the post with
- >a '.', the server reponds with a 441, "No Newsgroups: or Subject:". Yet
- >both are there.
- >
- >Telnetting to the server, I can get it to responded correctly (240) by
- >just typing in the lines
- >
- >post
- >Newsgroups: uw.test
- >Subject: testing, ignore
- >...
- >
- >So I tried doing only those simple lines, with rxsock. Here's the short
- >snippet I'm using - the socket is properly opened and stuff:
- >
- >trc=SendCommand(sock,"post")
- >parse var line.1 code .
- >say line.1
- >i = SockSend(sock,'Newsgroups: uw.test' || '0d0a'x);
- >i = SockSend(sock,'Subject: testing, ignore' || '0d0a'x);
- >trc=SendCommand(sock,'.')
- >
- >The "post" goes through fine, so SendCommand (which eventually uses
- >SockSend) works fine. BTW, SendCommand is ripped from REXXNEWS. It is
- >interesting to note that REXXNEWS can't post either (it gives the same
- >error) - rexxnews is a basic rexx newsreader found on hobbes.
- >
- >Does anyone have any suggestions on what I'm doing wrong? Does anyone
- >have a REXX script that does what I want, already (just take a raw
- >article text and post it to the server) ? Thanks.
- >
- >
- >
- >/ ,__, | Ethan Hall-Beyer [UofWaterloo AM/CS JT HCO (2A)]
- > (0;0) whoo? | eahallbe@descartes.uwaterloo.ca
- > ((\ /)) | http://www.undergrad.math.uwaterloo.ca/~eahallbe
- >=`\w=w/'====== | Views expressed are my own, as an individual.
-
- Some ideas. Since I don't know your code for SendCommand make sure the
- "post" and '.' get '0d0a'x appended to the ends before transmitting. Your
- rexx code looks like it is doing the same thing as your telnet connection. I
- usually build the SockSend string before passing so:
-
- data = 'Newsgroups: uw.test'||'0d0a'x
- i = SockSend(sock,data)
-
- Oh yeah, think I see it. Remove the trailing ; after both SockSend.
-
- ---
- Jim
- CyberNet Connections
-
-
-